<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admseqdet.php,v $ 
 * $Date: 2005/10/21 12:58:07 $ 
 * $Revision: 1.3 $ 
 * 
 * ********* CVS HEADER ********* 
 */
include("environnement/$session[environnement]/header.php");
require_once(get_path_module("admin"));
$pc = new panneau_controle();
$pc->calculRubriqueParFonction('admseqliste');
echo $pc->retourneEntete();
?>
<?php
$query="SELECT * FROM sequence WHERE id='$argid'";
$result=rportalrequete($query) or die ("ERREUR 0014");
if($row=rportalligne($result)) {
echo "<h1>DETAIL DE LA SEQUENCE : ".strtoupper($row[nom])."</h1><br>\n<i>$row[description]</i><hr>\n";
} else {
exit;
}
?>
<u>Liste des scripts de la sequence:</u>
<table>
 <tr>
 	<th>nom</th>
 	<th>description</th>
 	<th></th>
 </tr>
<?php
$query="SELECT sequence_ordre.*,sequence_etape.nom,sequence_etape.description FROM sequence_ordre,sequence_etape WHERE sequence_ordre.id_sequence='$argid' AND sequence_ordre.id_etape=sequence_etape.id ORDER BY sequence_ordre.id ASC";
$result=rportalrequete($query) or die ("ERREUR 0010");
$class="class=\"liste_impaire\"";
while($row=rportalligne($result))
{
	echo "<tr $class><td>$row[nom]</td>\n";
	echo "<td>$row[description]</td>\n";
	echo "<td><a href=\"?op=admseqdetsupp&argid=$argid&argeta=$row[id]\">supprimer</a></td></tr>\n";
	if($class!="class=\"liste_impaire\"")
	{
		$class="class=\"liste_impaire\"";
	}else{
		$class="class=\"liste_paire\"";
	}
}
?>
</table>
<form action="?op=admseqdetadd&argid=<?php echo $argid;?>" method="POST">
<select size="1" name="argeta">
<option>S&eacute;lectionnez un script &agrave; ajouter</option>
<option>--------------------------------</option>
<?php
$query="SELECT * from sequence_etape ORDER BY nom ASC";
$result=rportalrequete($query) or die ("ERREUR 0076");
while($row=rportalligne($result))
{
	echo "<option value=\"$row[id]\"><b>$row[nom]</b> : <i>$row[description]</i></option>\n";
}
?>
</select>
<input type="submit" value="Ajouter">
</form>
<hr>
<?php
include("environnement/$session[environnement]/footer.php");
?>